package com.example.client.controller;

import com.example.client.config.NettyClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: 582895699@qq.com
 * @Desctription: TODO
 * @Date: Created in 2021/11/28 23:35
 */
@RestController

@Controller
@RequestMapping(value = "/client")
public class ClientController {

    @Resource
    NettyClient nettyClient;

    @GetMapping(value = "/send")
    public String send(String type, String message) {
        nettyClient.send(type, message);
        return "success";
    }
}
